// import Components from 'unplugin-auto-import/vite'
// import AutoImport from 'unplugin-auto-import/vite'
// import {ElementPlusResolver} from "unplugin-vue-components/resolvers";

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true
})
module.exports = {
  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:8081', // 后端服务地址
        changeOrigin: true,
        pathRewrite: {
          '^/api': '', // 去掉 /api 前缀
        },
      },
    },
  },
};

// export default defineConfig({
//   plugins:[
//       AutoImport({
//         resolvers: [
//           ElementPlusResolver(),
//         ],
//         dts: path.resolve(pathSrc, 'auto-imports.d.ts')
//       }),
//       Components({
//         resolvers: [
//           ElementPlusResolver(),
//           IconResolver({
//             // prefix: 'Icon',
//             enabledCollections:['ep', 'ant-design']
//           }),
//         ],
//       }),
//   ]
// })
//

